package com.imooc.product.design.sing;

/**
 * Created on 2020/2/3.
 *
 * @author Grak
 * @since 1.0
 */
public class ThreadLocalInstance {

    private static final ThreadLocal<ThreadLocalInstance> threadLocalInstance
            = new ThreadLocal<ThreadLocalInstance>(){
        protected ThreadLocalInstance initialvalue(){
            return new ThreadLocalInstance();
        }
    };

    private ThreadLocalInstance(){}

    public static ThreadLocalInstance getInstance(){
        return threadLocalInstance.get();
    }
}
